<template>
  <div>
    <swiper class="swiper">
      <el-carousel-item v-for="(item, index) in banners" :key="index">
        <a :href="banners[index].link">
          <img :src="banners[index].image" alt=""  @load="imageLoad"/>
        </a>
      </el-carousel-item>
    </swiper>
  </div>
</template>

<script>
import Swiper from "@/components/common/swiper/Swiper.vue";
export default {
  name: 'Homeswiper',
  props:{
    banners:''
  },
  components:{
    Swiper
  },
  data() {
    return {
      isLoad:false
    };
  },

  mounted() {
    
  },

  methods: {
    imageLoad(){
      if(!this.isLoad){
        this.$emit('swimgLoad');
        this.isLoad=true
      }
      
    }
  },
};
</script>

<style lang="css" scoped>
img {
  width: 100%;
  height: 100%;
}
.swiper >>> .el-carousel__container{
    height: 150px;
  }
</style>